/**
 * \addtogroup Slider Slider API
 * @{  
 * This file specifies the Samsung Slider API for Windows Mobile devices.
 *
 * The Samsung Slider API enables applications to determine if a slider phone's keyboard 
 * is opened or closed.
 * 
 * Copyright &copy; 2009 Samsung Electronics
 *   
 * File: smiSlider.h
 */
#ifndef _SMI_SLIDER_H_
#define _SMI_SLIDER_H_

#include <smiSDK.h>


/**
 *  Slider states.
 */
typedef enum 
{

    SMI_SLIDER_STATE_CLOSED ,

    SMI_SLIDER_STATE_OPEN   

} SmiSliderState;

/**
 *  Pointer to function that handles slider events. The current state is passed in
 *  as a parameter.
 */ 
typedef void (*SmiSliderEventHandler)(SmiSliderState state);



/**
 *   Gets the current state of slider.
 * 
 *  @param state [out]			Pointer to an initialized SmiSliderState object.
 *
 *  @return  
 *                              SMI_SUCCESS on success
 *  \n							SMI_ERROR_INVALID_PARAMETER if the input parameter is NULL
 *  \n							SMI_ERROR_DEVICE_NOT_FOUND if the device does not have a slider keyboard
 */ 
SMI_API SMI_RESULT SmiSliderGetState(SmiSliderState* state);
 

/**
 *   Registers a callback handler to be called whenever the slide state changes.
 *   A client can only register one handler per process.
 * 
 *  @param handler [in]			Pointer to function that will handle the event
 *
 *  @return  
 *                              SMI_SUCCESS on success
 *  \n							SMI_ERROR_INVALID_PARAMETER if the input parameter is NULL
 *  \n							SMI_ERROR_DEVICE_NOT_FOUND if the device does not have a slider keyboard
 */ 
SMI_API SMI_RESULT SmiSliderRegisterOnChangeHandler(SmiSliderEventHandler handler);


/**
 *  Unregisters the handler registered by a previous call to 
 *  the SmiSliderRegisterOnChangeHandler() function.
 *
 *  @return  
 *                              SMI_SUCCESS on success
 *  \n							SMI_ERROR_DEVICE_NOT_FOUND if the device does not have a slider keyboard
 */ 
SMI_API SMI_RESULT SmiSliderUnregisterOnChangeHandler(void);


#endif // _SMI_SLIDER_H_
/* @} */